﻿// This code is released under the BSD license.
namespace PugLib
{
    using System.Collections.Generic;

    public class StringOrdinalCompare : Comparer<object>
    {
        public override int Compare(object x, object y)
        {
            if (x == null)
            {
                return -1;
            }
            return y == null ? 1 : string.CompareOrdinal(x.ToString(), y.ToString());
        }
    }
}